﻿using System;
using System.ComponentModel;

namespace UtfprLibrary.EntityFramework.ComponentModel {
    /// <summary>
    /// Extends the IBindingListView with properties and methods relative to the entity set.
    /// </summary>
    public interface IEntityBindingList : IBindingListView {
        /// <summary>
        /// Gets the <see cref="IUtfprBindingSource"/> that owns the elements on this list.
        /// </summary>
        IEntityDataSource DataSource { get; }

        /// <summary>
        /// Gets the type of element on this list.
        /// </summary>
        Type ElementType { get; }

        /// <summary>
        /// Refresh the list by re-loading all items from the source query.
        /// </summary>
        void Refresh();
    }
}
